import {createSlice, PayloadAction} from "@reduxjs/toolkit";
import { RootState } from "../store";

const skillSlice = createSlice({
    name: 'skills',
    initialState: '',
    reducers: {
        saveSkills: (state, action: PayloadAction<string>) => {
            return action.payload
        },
        reInitSkills: (state, action) => action.payload
    }
})

export default skillSlice.reducer;

export const getSkills = (state: RootState) => state.skills;

export const { saveSkills, reInitSkills } = skillSlice.actions;
